import request from "../../request/index";
import config from "../../config/index";

const { baseUrl } = config

// 首页景区列表
export function scenList(data) {
    return request({
        url: `${baseUrl}/card-ticket/tourism/getAllTourism`,
        method: 'post',
        data
    })
}

// 首页轮播图
export function swiperList() {
    return request({
        url: `${baseUrl}/card-ticket/recommend/effectiveRecommend`,
        method: 'get',
    })
}

// 搜索页关键词
export function keyWordsList() {
    return request({
        url: `${baseUrl}/card-ticket/tourism/getHotList`,
        method: 'get',
    })
}

// 景区详情门票列表
export function scenProductList(data) {
    return request({
        url: `${baseUrl}/card-ticket/tourism/getTourismInfo`,
        method: 'post',
        data
    })
}

// 价格日历
export function calendarPriceInquiry(id) {
    return request({
        url: `${baseUrl}/card-ticket/prod/calendarPriceInquiry/${id}`,
        method: 'get',
    })
}

// 创建订单（获取token）
export function confirmOrder(data) {
    return request({
        url: `${baseUrl}/card-ticket/ticket/confirmOrder`,
        method: 'post',
        data
    })
}

// 提交订单
export function createOrder(data) {
    return request({
        url: `${baseUrl}/card-ticket/ticket/createOrder`,
        method: 'post',
        data
    })
}
// 票务管理员登录验证
export function loginVerify(data) {
    return request({
        url: `${baseUrl}/card-ticket/admin/login`,
        method: 'post',
        data
    })
}

// 所有订单列表
export function getProdOrderAll(data) {
    return request({
        url: `${baseUrl}/card-ticket/ticket/getProdOrderAll`,
        method: 'post',
        data
    })
}
